<template>
  <div>
    <el-button class="fr" type="primary">导出</el-button>
    <el-table
      v-loading="loading"
      :data="checkList"
      style="width: 100%;"
    >
      <el-table-column label="批号" align="center" prop="checkNo" :show-overflow-tooltip="true"/>
      <el-table-column label="生产日期" align="center" prop="createTime" :show-overflow-tooltip="true"/>
      <el-table-column label="失效日期" align="center" prop="lossTime" :show-overflow-tooltip="true"/>
      <el-table-column label="浓度" align="center" prop="concentration"/>
      <el-table-column label="库存数量" align="center" prop="num" :show-overflow-tooltip="true"/>
      <el-table-column label="所属科室" align="center" prop="officeName" :show-overflow-tooltip="true"/>
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
  </div>
</template>

<script>

export default {
  props: {
    user: {
      type: Object
    }
  },
  data() {
    return {
      checkList: [],
      loading: false,
      total: 5,
      pageNum: 1,
      pageSize: 20
    };
  },
  created() {
    this.handleLoadAndQuery()
  },
  methods: {
    handleLoadAndQuery() {
      this.checkList = []
      let check = {
        checkNo: '20210718',
        createTime: '2021/02/01 12:00',
        lossTime: '2022/02/01 12:00',
        concentration: '高',
        num: '100',
        officeName: '检验科'
      }
      for (let i = 0; i < 5; i++) {
        this.checkList.push(check)
      }
    }
  }
};
</script>
